package bishi;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/9/5 18:48
 * @Version 1.0
 */
public class Sougou02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String s1 = s.replaceAll("\\[", "").replaceAll("\\]", "");
        String[] split = s1.split(",");
        ArrayList<Double> list = new ArrayList<>();
        for (int i = 1; i < split.length; i++) {
            list.add(Double.parseDouble(split[i]));
        }
        double n = Double.parseDouble(String.valueOf(split[0]));

        int ans = 0;
        double left = 0.0;
        double right = 0.0;

        for (int i = 0; i < list.size() - 1; i += 2) {
            double center = list.get(i);
            left = center - list.get(i+1) / 2;
//            System.out.println("left "+left);
            if ((left - right) > n && i != 0) {
                ans += 2;
            } else if ((left - right) == n && i != 0) {
                ans += 1;
            }
            right = center + list.get(i+1) / 2;
//            System.out.println("right " + right);
        }
        ans +=2;
        System.out.println(ans);
    }
}
